package mipo.top.base.config;

import mipo.top.base.interceptor.Logininfointerceptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
@Configuration
public class loginconfig implements WebMvcConfigurer {

    @Autowired
    private Logininfointerceptor logininfointerceptor;

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(logininfointerceptor).addPathPatterns("/**")
                .excludePathPatterns("/login/**")
                .excludePathPatterns("/fastDfs/**")
                .excludePathPatterns("/register/**")
                .excludePathPatterns("/shop/settlement/**")
                .excludePathPatterns("/verifyCode/**");
    }
}
